/*
 * @(#)EventRegister.java 0.5 08/12/04
 *
 * Copyright 2008 100town.com. All rights reserved.
 * Use is subject to license terms.
 */

package org.collada.util.action;

import java.awt.event.ActionListener;
import java.awt.event.KeyListener;

import javax.media.opengl.ComponentEvents;
import javax.swing.AbstractButton;

public class EventRegister {
	public static void registerListener(ComponentEvents componentEvents, KeyListener keyListener){
		componentEvents.addKeyListener(keyListener);
	}
	public static void unRegisterListener(ComponentEvents componentEvents, KeyListener keyListener){
		componentEvents.removeKeyListener(keyListener);
	}
	public static void registerListener(AbstractButton button, ActionListener actionListener){
		button.addActionListener(actionListener);
	}
	public static void unRegisterListener(AbstractButton button, ActionListener actionListener){
		button.removeActionListener(actionListener);
	}
}
